Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 18-Dec-2010 05:22:49

kenshin1987
Member
Registered: 10-Nov-2010
Posts: 100

[solved]dependencies's debug version lib not use

Hey,Guys
I fond,the project only link release version of zlib libpng libjpeg.
how can I link debug dependcies in debug mode?

Last edited by kenshin1987 (18-Dec-2010 18:49:35)

Offline

#2 18-Dec-2010 05:37:22

kenshin1987
Member
Registered: 10-Nov-2010
Posts: 100

Re: [solved]dependencies's debug version lib not use

it will lead warning LNK4098 appear

Offline

#3 18-Dec-2010 18:52:57

kenshin1987
Member
Registered: 10-Nov-2010
Posts: 100

Re: [solved]dependencies's debug version lib not use

should rewrite the findxxx.cmake  like ogre's findzlib
both find debug and release version

and delete lines:

# Add library and include paths from the dependencies
include_directories(
  ${BOOST_INCLUDE_DIR}
  ${X11_INCLUDE_DIR}
  ${ZLIB_INCLUDE_DIRS}
)

link_directories(
  ${X11_LIBRARY_DIRS}
  ${ZLIB_LIBRARIES}
)

in the ScolDependencies.cmake file

in fact ,I don't know why these code in there and it seems no function

Last edited by kenshin1987 (18-Dec-2010 18:58:01)

Offline

#4 19-Dec-2010 11:15:47

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: [solved]dependencies's debug version lib not use

Linux version ? (i answser but I have not seen all in cmake conf ....  )

Offline

#5 20-Dec-2010 10:11:15

Nodrev
Scol Language & OS3D developer
From: Nantes, France
Registered: 29-Dec-2009
Posts: 197

Re: [solved]dependencies's debug version lib not use

Hey!

Yep, i know for this LNK4098 warning (http://msdn.microsoft.com/en-us/library … 71%29.aspx), and we got many solution to resolves that:
1) Like you said, rewrite the FindZLib.cmake script. I did not choose this solution for now, cause i want to use cmake officials scripts whenever it's possible (less maintenance work for me wink, and multiplatforms scripts).
2) Add a "/NODEFAULTLIB" statement to preprocessor flags. The problem for that it that's not easy to add some definitions specially for a compilation target (in our case, debug) with cmake.
3) Ignore this warning, as we do not really need to have zlib debug symbols (in my opinion). We could eventually use 'pragma ignore warning', or nothing at all...
Initially, I arbitrary choose the 3rd solution, as for me this warning is not critical, and there's drawbacks for the others solution, but, i could eventually switch to solution 1.

Kenshin wrote:

in fact ,I don't know why these code in there and it seems no function

Yep, those lines are unuseful here (it's a "for all projects" include and libs inclusion path). Should be removed.

iri wrote:

Linux version ?

The cmake system was initialy the one i used to compile the vm on ubuntu, so it "was" working, but do not know how that's goes now...

Offline

Board footer

Powered by FluxBB