I am trying to use lpsolve for optimisation in MS Visual C++ 2010. However, I have attempted to follow the instructions on linking the libraries but I still get errors when trying to run the demo available on the lpsolve site.
I am on a 64-bit system, but I can only make a console 32 application
in VS2010
I have placed the lpsolve55.dll in both System32 and SysWOW64
I have put all the header files in C:\Program Files (x86)\Microsoft
Visual Studio 10.0\VC\include
I have put all the library files and the dll in C:\Program Files
(x86)\Microsoft Visual Studio 10.0\VC\lib
In the project preferences, linker, additional dependencies I have
listed lpsolve55.lib
Using the win32 lpsolve archive,
The demo compiles, but then throws the following error as soon as it runs:
"Unhandled exception at 0x77b98e19 in lpsolveDEMO.exe: 0xC0000005: Access violation writing location 0x00000014."
I have no experience adding libraries or using any really other than the stdio library. Any help would be greatly appreciated, or any suggestions for more straightforward to use linear optimisation libraries as I can't find any tutorial on lpsolve other than this demo that doesn't work
Related
I have built the WebRTC library by using this tutorial:
https://webrtc.org/native-code/development/
Then I try to run this simple program on both Visual Studio 2013 Community and Visual Studio 2017 Professional:
image here
However in both cases I have the same error:
Error LNK1107 invalid or corrupt file: cannot read at 0x159BE command_line_parser.lib
I have tried to link to any possible webrtc *.lib files, but the problem still remains.
What is the correct way to link webrtc library to visual C++?
You need cl.exe as compiler. Default by gn build prosess for generating the ninja files is set 'is_clang = true' and the clang.exe compiler is used.
please set in 'gn args --lists out/debug ' the parameter 'is_clang = false'.
The problem is with the linker, not with the compiler. you can link the webrtc .obj files but you can't link the webrtc .lib files.
I solve it with the GN build option "use_lld=false".
I can't properly setup manual profiling using Visual Studio's API. I used this MSDN guide to link their lib to my project. But I'm getting unresolved external symbol __imp_StopProfile while trying to launch the code that includes and uses StopProfile function. I've set the path to the profiling library in my project properties and added the name of the library to the linker. I tried to include both VS12 and VS14 versions, no luck.
I believe you are trying to build x64 application which requires x64 VSPerf.lib which can be found at C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools\x64\PerfSDK. Please note that x64 folder there.
I have a fairly simple C++ project in Visual C++ 2010 Express on Windows 7. I have no problems compiling in Debug mode for Win32, but when I switch to Release mode for Win32 I get the following compiler error:
LINK : fatal error LNK1296: unable to load msobj100.dll
I know this question has been asked here, but I couldn't get a fix from that solution. I did a search for that file, and it is only located in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE. Within SysWOW64 and Win32, there are files called 'msobjs.dll', but that's it. Any ideas?
Try to install the Windows SDK to your computer. These Files Should be distributed.Along with it.
See here.
Copy the missing dll file from
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
to
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin.
VC\Bin is the runtime path.
This problem also bothered me for a long time, and I had to run Release mode in another machine...
and I find the solution just now.
I tried renaming a c++ project in Visual Studio and I'm now getting the following errors:
An unhandled exception of type
'System.Resources.MissingManifestResourceException' occurred in
mscorlib.dll
Additional information: Could not find any resources appropriate for
the specified culture or the neutral culture. Make sure
"OuiDesktop.PreForm.resources" was correctly embedded or linked into
assembly "OuiProject" at compile time, or that all the satellite
assemblies required are loadable and fully signed.
I get this for every each form that uses a resource. If I comment these lines of code out that raise this error, the program launches okay, but I need the resources.
What have i done wrong? Seems renaming a project in Visual Studio is a nightmare!!
These .resources files are being created in the build directory just fine, just not being included in the assembly!
I was using Visual Studio Express 2010 on this machine. Creating a new project and adding the source files back into that in Express didn't work.
I tried this same fix on another machine with full Visual Studio 2010 Professional and it worked perfectly.
I'm now going to give c++ a try to see what this language have to offer. I'm having some trouble setting it all up though. I have downloaded Eclipse CDT and followed this guide : http://www.dcs.vein.hu/bertok/oktatas/cpp_by_eclipse/eclipse_for_cpp_on_windows.html#Install_gdb
I am using Windows 7 64bit.
I have never installed a compiler before, and I'm not sure what exactly I am doing wrong. It gives me an "Launch failed. no binary found" error when I try to run my program. However there is no binaries folder. I have tried building, it loads for a while, but nothing really happens.
Any idea what to do? I am completely new at c++ so please be patient and let me know if there's anything I am missing :)
The console in eclipse says the following:
Build of configuration Debug for project Test2 **
Internal Builder is used for build ** cl /c /EHs /MD /Zi /nologo /Fospam.obj ..\spam.cpp Internal Builder: Cannot run program "cl" (in directory "C:\cppworkspace\Test2\Debug"): CreateProcess error=2, Den angivne fil blev ikke fundet Error: Program "cl" is not found in PATH
PATH=[C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x86;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x64;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\TortoiseSVN\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\MinGW\bin] Build error occurred, build is stopped Time consumed: 156 ms.
If you will compile with Eclipse CDT + MingGW Compiler you should use the MinGW toolchain
MingW Toolchain
If you want use Eclipse + Microsoft C++ compiler, need change for "Microsoft Visual C++" toolchain and put in PATH
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
or whatever you have because CL program is there...
The problem is simple enough, Eclipse can't find your compiler.
On the lengthy PATH that is quoted I don't see 'c:\MinGW\bin' so I'm guessing you had problems with step 4 under section install MinGW.
Having said all that I don't think Eclipse is a very good environment for developing C++ and I don't think MinGW is a particularly good compiler. I'd seriously recommend you take a look at Visual C++ 2010 Express, which you can download from here http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express
EDIT
OK now I do see 'c:\MinGW\bin', so apologies for that. I think the likely explanation is that you have selected the wrong 'tool chain'. Eclipse thinks you want to build with Visual C++ but you have downloaded MinGW. But really get Visual C++ 2010 Express and forget about Eclipse, it's much easier.