| LIB from Visual C++ cannot link to UPP package [message #5677] |
Mon, 09 October 2006 14:15  |
zaurus
Messages: 42 Registered: May 2006
|
Member |
|
|
Hi!
Is it basically possible to create a library with Visual C++ and then use it in a UPP package?
I tried and copied the lib-file and header-files into the package folder and then included it in the package. I also change the settings und 'Build Methods' to include the path to my lib-file, but I always get problems during linking. Some unresolved references.
Thanks for any help.
|
|
|
|
|
|
|
|
|
|
| Re: LIB from Visual C++ cannot link to UPP package [message #5919 is a reply to message #5717] |
Wed, 25 October 2006 12:44   |
cioannou
Messages: 45 Registered: January 2006 Location: Greece
|
Member |
|
|
That's exactly what I did and when linking I get a nice message:
Linking...
\mingw\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -llibboost_filesystem-mgw-s-1_33_1.lib
collect2: ld returned 1 exit status
And I have added the c:\upp\myapps\mysqldemo dir in Package Organizer->Link Options
-Lc:\upp\myapps\mysqldemo
[Updated on: Wed, 25 October 2006 12:46] Report message to a moderator
|
|
|
|
| Re: LIB from Visual C++ cannot link to UPP package [message #5940 is a reply to message #5677] |
Wed, 25 October 2006 15:25   |
yeohhs
Messages: 75 Registered: November 2005 Location: Malaysia
|
Member |
|
|
Hi,
If you are using MinGW in Ultimate++, there will be problems when linking Visual C++ libs with your project. This is because the MinGW .a library files are not compatible with Visual C++'s .lib files.
If you use MSC7.1 or MSC8 in Ultimate++, there should be no problems.
Hope this helps.
Best Regards,
Yeoh
|
|
|
|
|
|
|
|
| Re: LIB from Visual C++ cannot link to UPP package [message #5945 is a reply to message #5943] |
Wed, 25 October 2006 16:54   |
yeohhs
Messages: 75 Registered: November 2005 Location: Malaysia
|
Member |
|
|
| cioannou wrote on Wed, 25 October 2006 21:55 |
Actually, I built Boost using both mingw and VC so I have two different libs. But the same error is displayed in VC also.
Linking...
LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc71-sgd-1_33_1.lib'
|
Hello,
Sorry about my incorrect assumption earlier.
From your linker error, it looks like the linker cannot find the .lib file. Is the file libboost_filesystem-vc71-sgd-1_33_1.lib created? And in which folder is it in? You'll probably need to re-check your libraries path.
Best Regards,
Yeoh
|
|
|
|
| Re: LIB from Visual C++ cannot link to UPP package [message #5984 is a reply to message #5945] |
Thu, 26 October 2006 16:29   |
cioannou
Messages: 45 Registered: January 2006 Location: Greece
|
Member |
|
|
From the error message I get, that's the assumption I made too.
Checked and re-checked the paths and filenames (copy/paste) but still getting the same message, no matter if I use the mingw or the VC .lib
Here is what I do:
a) Build-Methods-> LIB-directories for lib files-> Copy & Paste the path from my explorer window.
C:\Dev-Cpp\include\boost\bin\boost\libs\filesystem\build\lib boost_filesystem.lib\mingw\release\runtime-link-static
b) Package Organizer->New Libraries-> Copy & Paste the lib filename from the previous explorer window.
libboost_filesystem-mgw-s-1_33_1.lib
F7 (Build)
I Even tried to put the full path and filename in Package Organizer, but I get the same message.
That's all
(Same logic works in Dev-C++)
[Updated on: Thu, 26 October 2006 16:32] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: LIB from Visual C++ cannot link to UPP package [message #8129 is a reply to message #6061] |
Sun, 11 February 2007 18:50   |
captainc
Messages: 278 Registered: December 2006 Location: New Jersey, USA
|
Experienced Member |
|
|
Did you ever find a solution to your problem? I have a similar problem with another library and would like to know.
I am getting the error:
LINK : fatal error LNK1104: cannot open file 'C:\Program Files\upp\out\tclap\MSC8.\tclap.lib'
Using MSC8 Optimal build (it compiles and runs fine in the debug build). tclap is the name of a package that I created and populated with a code library.
Is the linker looking for a file or a folder? And why would it have a directory like "MSC8."?
Edit 1: Upp was not building the object/library files for the tclap package. I got it to compile by removing the package dependency and then simply including the header file for the library. What would cause it not to create object files for that package of code?
[Updated on: Sun, 11 February 2007 19:18] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|