|
|
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Possible bug
Possible bug [message #7854] |
Fri, 26 January 2007 18:11 |
fithisux
Messages: 12 Registered: January 2007
|
Promising Member |
|
|
I use windows xp SP2, and the proposed 3.4.5 mingw toolchain.
I try to link a small app I have written with libxml2. I downloaded the binaries from http://www.zlatkovic.com/pub/libxml/
and I decompressed all in my c:\xmlsoft_distro folder with layout
c:\xmlsoft_distro\bin
c:\xmlsoft_distro\lib
c:\xmlsoft_distro\include
..... blah .. blah
My app is TestXML. When the linker tries to generate according to mingw I have to do something like (in MSYS)
g++ -mwindows -mconsole -c TextXML.cpp -I"c:/xmlsoft_distro/lib"
and for linking (you have to put the full path to the lib, because mingw views it like an object file)
g++ -mwindows -mconsole -o TestXML.exe TestXML.o c:/xmlsoft_distro/libxml2.lib
It works fine.
Upp 2007.1.Beta2 does something similar for compilation and works but for linking it does something similar to
g++ -mwindows -mconsole -o TestXML.exe c:/xmlsoft_distro/libxml2.lib TestXML.o
which fails.
Can you take a look? .exe and .o must be switched I think. I used http://www.xmlsoft.org/examples/index.html#tree1.c as TreeXML.cpp
Solve some minor bugs and VS will be phased out. Thanks for the great IDE.
|
|
|
|
|
|
|
Re: Possible bug [message #7909 is a reply to message #7903] |
Wed, 31 January 2007 09:52 |
fithisux
Messages: 12 Registered: January 2007
|
Promising Member |
|
|
I will give you more details. As I mentioned before everything is in folder c:/xmlsoft_distro
In project manager (I used configuration STUDENT_VER, just for fun) I added
Compiler options
1. WHEN STUDENT_VER : -Ic:/xmlsoft_distro/include
Libraries
2. WHEN STUDENT_VER : C:/xmlsoft_distro/lib/libxml2.lib C:/xmlsoft_distro/lib/zlib.lib C:/xmlsoft_distro/lib/iconv.lib
The output is
----- TestXML ( MT STUDENT_VER MAIN GCC DEBUG SO SHARED DEBUG_FULL WIN32 )
cd c:\MyApps\TestXML
TestXML.cpp
mingw32-g++ -c -I"c:\MyApps" -I"C:\mingw\include" -DflagMT -DflagSTUDENT_VER -DflagMAIN -DflagGCC -DflagDEBU
G -DflagSO -DflagSHARED -DflagDEBUG_FULL -DflagWIN32 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=31 -DbmHOUR=10 -Db
mMINUTE=48 -DbmSECOND=10 -mthreads -g2 -shared -fPIC -Ic:/xmlsoft_distro/include -fexceptions -D_DEBUG -
O0 -fuse-cxa-atexit -x c++ "c:\MyApps\TestXML\TestXML.cpp" -o "C:/MyApps/out/TestXML/MINGW.Debug_full.Mai
n.Mt.Noblitz.Shared.So.Student_ver\TestXML.o"
c:\MyApps\TestXML\TestXML.cpp:1: warning: -fPIC ignored for target (all code is position independent)
C:\mingw\bin\mingw32-g++.exe -c -I"c:\MyApps" -I"C:\mingw\include" -DflagMT -DflagSTUDENT_VER -DflagMAIN -Df
lagGCC -DflagDEBUG -DflagSO -DflagSHARED -DflagDEBUG_FULL -DflagWIN32 -DbmYEAR=2007 -DbmMONTH=1 -DbmDAY=3
1 -DbmHOUR=10 -DbmMINUTE=48 -DbmSECOND=10 -mthreads -g2 -shared -fPIC -Ic:/xmlsoft_distro/include -fexcep
tions -D_DEBUG -O0 -fuse-cxa-atexit -x c++ "c:\MyApps\TestXML\TestXML.cpp" -o "C:/MyApps/out/TestXML/MIN
GW.Debug_full.Main.Mt.Noblitz.Shared.So.Student_ver\TestXML. o "
compiled in (0:03.13)
TestXML: 1 file(s) built in (0:02.99), 2994 msecs / file, duration = 3294 msecs
Linking...
mingw32-g++ -mwindows -mconsole -o " C:\MyApps\out\MINGW.Debug_full.Mt.Noblitz.Shared.So.Student_ ver\TestXML.e
xe" -ggdb -L"C:\mingw\lib" -Wl,-O,2 " C:/MyApps/out/TestXML/MINGW.Debug_full.Main.Mt.Noblitz.Share d.So.St
udent_ver\TestXML.o" -Wl,--start-group -lC:/xmlsoft_distro/lib/libxml2.lib -lC:/xmlsoft_distro/lib/zlib.
lib -lC:/xmlsoft_distro/lib/iconv.lib -Wl,--end-group
C:\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bi n\ld.exe: cannot find -lC:/xmlsoft_distro/lib/lib
xml2.lib
collect2: ld returned 1 exit status
C:\mingw\bin\mingw32-g++.exe -mwindows -mconsole -o "C:\MyApps\out\MINGW.Debug_full.Mt.Noblitz.Shared.So.Stud
ent_ver\TestXML.exe" -ggdb -L"C:\mingw\lib" -Wl,-O,2 "C:/MyApps/out/TestXML/MINGW.Debug_full.Main.Mt.Nob
litz.Shared.So.Student_ver\TestXML.o" -Wl,--start-group -lC:/xmlsoft_distro/lib/libxml2.lib -lC:/xmlsoft
_distro/lib/zlib.lib -lC:/xmlsoft_distro/lib/iconv.lib -Wl,--end-group
Error executing C:\mingw\bin\mingw32-g++.exe -mwindows -mconsole -o "C:\MyApps\out\MINGW.Debug_full.Mt.Noblit
z.Shared.So.Student_ver\TestXML.exe" -ggdb -L"C:\mingw\lib" -Wl,-O,2 "C:/MyApps/out/TestXML/MINGW.Debug_
full.Main.Mt.Noblitz.Shared.So.Student_ver\TestXML.o" -Wl,--start-group -lC:/xmlsoft_distro/lib/libxml2.
lib -lC:/xmlsoft_distro/lib/zlib.lib -lC:/xmlsoft_distro/lib/iconv.lib -Wl,--end-group
Exitcode: 1
There were errors. (0:04.20)
I used the simplified example to indicate my possible reason for the error
|
|
|
|
|
|
|
Re: Possible bug [message #8008 is a reply to message #7854] |
Sat, 03 February 2007 22:53 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
OK, it was that .lib extension after all... now fixed. Quick fix:
ide/Builders/GccBuilder.cpp 423
if(ext == ".a" || ext == ".so" || ext == ".dll" || ext == ".lib")
[Updated on: Sat, 03 February 2007 22:53] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Fri Apr 26 07:45:22 CEST 2024
Total time taken to generate the page: 0.03417 seconds
|
|
|