Search Results

Search found 207 results on 9 pages for 'msvc'.

Page 6/9 | < Previous Page | 2 3 4 5 6 7 8 9  | Next Page >

  • Use older version of MSVCR?

    - by user146780
    I have VS 2008 and I want my application to work with Windows 98 without needing to include MSVCR90.dll .. Win98 comes with MSVCR60 so how could I tell MSVC to do this? Is my only option to hunt down Visual studio 6? Thanks *also I want to avoid static linking msvcr

    Read the article

  • Trying to link my project with Boost.Thread using CMake

    - by wowus
    When I link Boost.Thread to my boost_test executable, it gives me make[2]: *** No rule to make target `/usr/lib64/libboost_thread-mt.so', needed by `gogo/test/test_boost'. Stop. when I make it. Here's the offending CMake code, what am I doing wrong? add_executable(boost_test boost_test.cpp) add_test(boost_test boost_test) # Boost auto-links for MSVC, so we exclude it. if(CMAKE_COMPILER_IS_GNUCXX) target_link_libraries(test_boost #LINK_INTERFACE_LIBRARIES ${Boost_THREAD_LIBRARY} ) endif()

    Read the article

  • C++ cin: don't show the newline

    - by sads
    If I get some value by using getline( cin, myStr ); a newline is printed after the information the user entered - logically as he pressed enter: Please enter something: ABC <enter => \n> This text is printed out by the program and should be in the same line as before How to keep the newline after user input away? I'm using MSVC 2010 and build a simple console app using iostream and string as main libraries.

    Read the article

  • c++: see compiled object layout

    - by horsthahn
    Hi, is there a way - much like the way i can see the result of preprocessing when using 'gcc -E' - to see what my objects look like once the compiler compiled them into object files? I am not too good in reading assembler, so an advice to get the results as text would be nice .. or at least a little 'howto read the constructor intructions' or 'howto find the constructor' ... I am talking about gcc/g++, but a solution including msvc would be fine. Thanks!

    Read the article

  • This is a valid C code but not a valid C++ code?

    - by claws
    In some library I'm using (written in C) its StorePGM(image, width, height, filename) char *image; int width, height; char *filename; { // something something } All functions are defined this way. I never seen such function definitions in my life. They seem to be valid to MSVC but when I compile it as C++ it gives errors. What is it? some kind of old version C?

    Read the article

  • Did C++11 address concerns passing std lib objects between dynamic/shared library boundaries? (ie dlls and so)?

    - by Doug T.
    One of my major complaints about C++ is how hard in practice it is to pass std library objects outside of dynamic library (ie dll/so) boundaries. The std library is often header-only. Which is great for doing some awesome optimizations. However, for dll's, they are often built with different compiler settings that may impact the internal structure/code of a std library containers. For example, in MSVC one dll may build with iterator debugging on while another builds with it off. These two dlls may run into issues passing std containers around. If I expose std::string in my interface, I can't guarantee the code the client is using for std::string is an exact match of my library's std::string. This leads to hard to debug problems, headaches, etc. You either rigidly control the compiler settings in your organization to prevent these issues or you use a simpler C interface that won't have these problems. Or specify to your clients the expected compiler settings they should use (which sucks if another library specifies other compiler settings). My question is whether or not C++11 tried to do anything to solve these issues?

    Read the article

  • Binary operator overloading on a templated class (C++)

    - by GRB
    Hi all, I was recently trying to gauge my operator overloading/template abilities and as a small test, created the Container class below. While this code compiles fine and works correctly under MSVC 2008 (displays 11), both MinGW/GCC and Comeau choke on the operator+ overload. As I trust them more than MSVC, I'm trying to figure out what I'm doing wrong. Here is the code: #include <iostream> using namespace std; template <typename T> class Container { friend Container<T> operator+ <> (Container<T>& lhs, Container<T>& rhs); public: void setobj(T ob); T getobj(); private: T obj; }; template <typename T> void Container<T>::setobj(T ob) { obj = ob; } template <typename T> T Container<T>::getobj() { return obj; } template <typename T> Container<T> operator+ <> (Container<T>& lhs, Container<T>& rhs) { Container<T> temp; temp.obj = lhs.obj + rhs.obj; return temp; } int main() { Container<int> a, b; a.setobj(5); b.setobj(6); Container<int> c = a + b; cout << c.getobj() << endl; return 0; } This is the error Comeau gives: Comeau C/C++ 4.3.10.1 (Oct 6 2008 11:28:09) for ONLINE_EVALUATION_BETA2 Copyright 1988-2008 Comeau Computing. All rights reserved. MODE:strict errors C++ C++0x_extensions "ComeauTest.c", line 27: error: an explicit template argument list is not allowed on this declaration Container<T> operator+ <> (Container<T>& lhs, Container<T>& rhs) ^ 1 error detected in the compilation of "ComeauTest.c". I'm having a hard time trying to get Comeau/MingGW to play ball, so that's where I turn to you guys. It's been a long time since my brain has melted this much under the weight of C++ syntax, so I feel a little embarrassed ;). Thanks in advance. EDIT: Eliminated an (irrelevant) lvalue error listed in initial Comeau dump.

    Read the article

  • Is there anything RAD comparable to VCL?

    - by mawg
    After years in embedded programming, I have to develop a Windows app. I dug out my old C++ Builder and Delphi. These are great and the latest version costs over $1k, so I won't be going there. What I prarticularly like is the VCL (visual component library) which let's me code my own components and share them with others, plus the thousands of existing 3rd party components. I noticed that there is now also a RAD PHP from Borland too. I realzie that MSVC, QT, NetBeans, etc are good enough IDEs for RAD, BUT does anything offer the ease of the Borland products for developing additional components - and does anything else have thousands to choose from? PC based? Cross-platform is good. Browser based? Free is always good ;-) I don't particularly care about the programming language.

    Read the article

  • Is it possible to share a C struct in shared memory between apps compiled with different compilers?

    - by Joseph Garvin
    I realize that in general the C and C++ standards gives compiler writers a lot of latitude. But in particular it guarantees that POD types like C struct members have to be laid out in memory the same order that they're listed in the structs definition, and most compilers provide extensions letting you fix the alignment of members. So if you had a header that defined a struct and manually specified the alignment of its members, then compiled two apps with different compilers using the header, shouldn't one app be able to write an instance of the struct into shared memory and the other app be able to read it without errors? I am assuming though that the size of the types contained is consistent across two compilers on the same architecture (it has to be the same platform already since we're talking about shared memory). I realize that this is not always true for some types (e.g. long vs. long long in GCC and MSVC 64-bit) but nowadays there are uint16_t, uint32_t, etc. types, and float and double are specified by IEEE standards.

    Read the article

  • How to build gnu `libiconv` on & for windows?

    - by claws
    Hello, I want to build a static library (*.LIB file) GNU libiconv on windows to be used with other libraries in Visual C++. Other libraries I'm using are built with "MultiThreaded DLL" (/MD) Runtime option. So, I need to build libiconv with the same option. Problem is the libiconv uses GNU build system and I want to compile with /MD option. You can see the source structure of libiconv here: http://cvs.savannah.gnu.org/viewvc/libiconv/?root=libiconv Actually, Mr. Zlatkovic maintains the windows port of GNU libiconv for libxml2 you can see them here: ftp://xmlsoft.org/libxml2/win32/iconv-1.9.2.win32.zip ftp://xmlsoft.org/libxml2/win32/iconv-1.9.2.win32.zip I cannot use his port. I need to build from the latest version of libiconv-1.13. I wonder how this guy has ported it? Can some one please tell me how to build *.lib from this and compile it using MSVC?

    Read the article

  • Is there anything RAD comparible to VCL?

    - by mawg
    After years in embedded programmking, I have to develop a windows app. I dug out my old C++ builder and Delphi. These are great and the latest version costs over $1k, so I won't be going there. What I prarticularly like is the VCL (visual component library) which let's me code my own components and share them with others, plus the thousands of existing 3rd party components. I noticed that there is now also a RAD PHP form Borland too. I realzie that MSVC, QT, NetBEans, etc are good enough IDEs for RAD, _BUT_ does anything offer the ease of the Borland products for developing additional components - and does anything else have thousands to choose from? PC based? Cross-platform is good. Browser based? Free is always good ;-) I don't particularly care about the programming language.

    Read the article

  • WebKit and npapi and mingw-w64

    - by rubenvb
    Hi, The problem is the following: On Windows x64, pointers are 64-bit, but type long is 32-bit. MSVC doesn't seem to care, and even omits warnings about pointer truncation on the default warning level. Since recently, there is a GCC that target x86_64-w64-mingw32, or better Windows x64 native. GCC produces errors when pointers are truncated (which is the logical thing to do...), and this is causing trouble in WebKit and more specifically, the Netscape Plugin API: First, there's the files (I can only post one hyperlink...): http://trac.webkit.org/browser/trunk/WebCore/ bridge/npapi.h -- defines uint32 as 32-bit int type (~line 145) plugins/win/PluginViewWin.cpp -- casts Windows window handles to 32-bit int, truncating them (~line 450) My proposed fix was to change the uint32 casts to uintptr_t, which makes GCC happy, but still puts a 64-bit value in a uint32 (=unsigned long). I have no clue how to solve this, because clearly WebKit is happy truncating pointers on Win64... How can I solve this the right way? Thanks!

    Read the article

  • bjam wih visual studio 2010

    - by ra170
    ok, so I ran into problems with Boost under visual studio 2010, so I decided to rebuild it with bjam: such as: bjam --toolset=msvc-10.0 --build-type=complete After running bjam (successfully?) it created a new directory under boost_1_42_0 called: bin.v2 Inside bin.v2 is directory called: libs. Two issues: 1. there's lot less libs under that new directory (about 13), the old directory libs has 88. Is it supposed to be like that or did something fail? 2. the structure is somewhat different too. What do I do with this exactly? Meaning, do I copy it over to the original libs, delete the old libs, try rebulding it with different flags?

    Read the article

  • Finding out whether a DirectInput device supports XInput (with mingw/gcc)

    - by Mr. Wonko
    I'm working on an input system, wrapping DirectInput and XInput. Currently XInput devices are enumerated twice, once as XInput and once as DirectInput (since they support both). How can I find out if a given DirectInput device also supports XInput? There is this MSDN page on the topic, but it requires wbemidl.h and wmsstd.h which aren't available in mingw/gcc (and for some reason I want to avoid msvc - probably by habit). I don't think blacklisting device names/guids is a good solution, but is there a better one? Thanks.

    Read the article

  • C++ to bytecode compiler for Silverlight CLR?

    - by paleozogt
    I'd like to be able to compile a C/C++ library so that it runs within a safe managed runtime in the Silverlight CLR. There are several tools for doing this with the JVM that allows C++ code to run within a CRT emulation layer (see NestedVM, LLJVM, etc), which effectively allows C++ code to be run within a Java Applet. There's even a tool for this for the Adobe Flash VM (see Alchemy). However, I can't seem to find any tools like this for the CLR. fyi, the MSVC tools don't seem to allow for this: The /clr:pure flag will create C++ code that runs in the CLR, but it isn't safe (because the CRT isn't safe) and /clr:safe requires massive code changes (no native types, etc).

    Read the article

  • Python: undefined reference to `_imp __Py_InitModule4'

    - by Mark
    I'm trying to do a debug build of the Rabbyt library using mingw's gcc to run with my MSVC built python26_d.. I got a lot of undefined references which caused me to create libpython26_d.a, however one of the undefined references remains. Googling gives me: http://www.techlists.org/archives/programming/pythonlist/2003-03/msg01035.shtml But -rdynamic doesn't help. e:\MinGW/bin\gcc.exe -mno-cygwin -mdll -O -Wall -g -IE:\code\python\python\py26\ include -IE:\code\python\python\py26\PC -c rabbyt/rabbyt._rabbyt.c -o build\temp .win32-2.6-pydebug\Debug\rabbyt\rabbyt._rabbyt.o -O3 -fno-strict-aliasing rabbyt/rabbyt._rabbyt.c:1351: warning: '__Pyx_SetItemInt' defined but not used writing build\temp.win32-2.6-pydebug\Debug\rabbyt\_rabbyt_d.def e:\MinGW/bin\gcc.exe -mno-cygwin -shared -g build\temp.win32-2.6-pydebug\Debug\r abbyt\rabbyt._rabbyt.o build\temp.win32-2.6-pydebug\Debug\rabbyt\_rabbyt_d.def - LE:\code\python\python\py26\libs -LE:\code\python\python\py26\PCbuild -lopengl32 -lglu32 -lpython26_d -lmsvcr90 -o build\lib.win32-2.6-pydebug\rabbyt\_rabbyt_d. pyd build\temp.win32-2.6-pydebug\Debug\rabbyt\rabbyt._rabbyt.o: In function `init_ra bbyt': E:/code/python/rabbyt/rabbyt/rabbyt._rabbyt.c:1121: undefined reference to `_imp __Py_InitModule4'

    Read the article

  • R6034: An application has made an attempt to load the C runtime library incorrectly.

    - by mattias
    I am getting this R6034 error when running program that I just updated (and cleaned) from VS2003 - VS2008. To be more exact: "R6034: An application has made an attempt to load the C runtime library incorrectly." It seems to happed almost at the same place all the time when running. I have no really idea why but I tried some suggestions I found when googleing this. For example adding the msvc dlls, but that didn't work. Any help on why this error occurs would be great. Thanks

    Read the article

  • 0 not a valid FILE* when provided as a template argument

    - by Seva Alekseyev
    The following code #include <stdio.h> template <typename T, T v> class Tem { T t; Tem() { t = v; } }; typedef Tem<FILE*,NULL> TemFile; when compiled in a .mm file (Objective C++) by Xcode on MacOS X, throws the following error: error: could not convert template argument '0' to 'FILE*'. What's going on, please? The code in question compiled fine under MSVC. Since when is the 0 constant not a valid pointer to anything? Is this an artifact of Objective C++ (as opposed to vanilla C++)?

    Read the article

  • C++ double division by 0.0 versus DBL_MIN

    - by wonsungi
    When finding the inverse square root of a double, is it better to clamp invalid non-positive inputs at 0.0 or MIN_DBL? (In my example below double b may end up being negative due to floating point rounding errors and because the laws of physics are slightly slightly fudged in the game.) Both division by 0.0 and MIN_DBL produce the same outcome in the game because 1/0.0 and 1/DBL_MIN are effectively infinity. My intuition says MIN_DBL is the better choice, but would there be any case for using 0.0? Like perhaps sqrt(0.0), 1/0.0 and multiplication by 1.#INF000000000000 execute faster because they are special cases. double b = 1 - v.length_squared()/(c*c); #ifdef CLAMP_BY_0 if (b < 0.0) b = 0.0; #endif #ifdef CLAMP_BY_DBL_MIN if (b <= 0.0) b = DBL_MIN; #endif double lorentz_factor = 1/sqrt(b); double division in MSVC: 1/0.0 = 1.#INF000000000000 1/DBL_MIN = 4.4942328371557898e+307

    Read the article

  • Referring to this pointer in a static assert?

    - by Tyson Jacobs
    Is it possible to write a static assert referring to the 'this' pointer? I do not have c++11 available, and BOOST_STATIC_ASSERT doesn't work. struct blah { void func() {BOOST_STATIC_ASSERT(sizeof(*this));} }; Produces: error C2355: 'this' : can only be referenced inside non-static member functions error C2027: use of undefined type 'boost::STATIC_ASSERTION_FAILURE' In MSVC 2008. Motivation: #define CLASS_USES_SMALL_POOL() \ void __small_pool_check() {BOOST_STATIC_ASSERT(sizeof(*this) < SMALL_MALLOC_SIZE;} \ void* operator new(size_t) {return SmallMalloc();} \ void operator delete(void* p) {SmallFree(p);}

    Read the article

  • GCC/XCode equivalent of _CrtCheckMemory?

    - by Chris Becke
    When dealing with random memory overwrites, in MSVC it is possible to validate the state of the heap at various points with a call to _CrtCheckMemory, and know with at least a small level of confidence that the code up until the check was not responsible for any errors that might cause new or malloc to fail later. In XCode, whats the equivalent way to try and box in a memory overwrite? All I have at the moment is a random failure of a call to new, somewhere deep in the bowels of some code with no real idea of how long the code has been running with a corrupt heap up until that point.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9  | Next Page >