Hi all,
When I try to build the CORE_glib project, I've got 2 error messages :
#1 :
>..\..\glib\gio\giomodule.c(926) : error C2065: 'GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS' : undeclared identifier
#2 :
>..\..\glib\gio\gdbusprivate.c(2059) : error C2065: 'HW_PROFILE_INFOA' : undeclared identifier
I've checked and it seems these identifiers are not declared in any included header files.
My configuration is :
Version :ImageMagic 6.9.0
Solution name : VisualDynamicMT.sln
IDE : Visual Studio 2005
System : Win7 x64 SP1
Could you help me please ?
Regards
Jean-Robert
Fail to compile CORE_glib project in VisualMagic solution
-
- Posts: 3
- Joined: 2014-11-27T05:59:36-07:00
- Authentication code: 6789
Re: Fail to compile CORE_glib project in VisualMagic solution
It is finding those defines in the header files from the Microsoft Windows SDK on my machine. Can you try installing it?
-
- Posts: 3
- Joined: 2014-11-27T05:59:36-07:00
- Authentication code: 6789
Re: Fail to compile CORE_glib project in VisualMagic solution
Hi,
The problem is that giomodule.c and gdbusprivate.c both include "config.h", but the compiler find the wrong one !
In the additional include directories of the CORE_glib project, "..\..\jpeg" directory comes before "..\..\glib\glib" directory. So the compiler inlcudes the "config.h" which is inside the jpeg project folder instead of the glib one.
I've fixed the problem by copying a version of "config.h" from "\glib\glib" directory into "\glib\gio" directory.
However, I've still a problem, this time during the linking. See the error below :
3>------ Build started: Project: CORE_glib, Configuration: Release Win32 ------
3>Linking...
3> Creating library ..\lib\CORE_RL_glib_.lib and object ..\lib\CORE_RL_glib_.exp
3>gwin32directorymonitor.obj : error LNK2019: unresolved external symbol _ReadDirectoryChangesW referenced in function _g_win32_directory_monitor_callback@12
3>..\bin\CORE_RL_glib_.dll : fatal error LNK1120: 1 unresolved externals
3>Build log was saved at "file://c:\Home\Projects\Test\ImageMagick\ImageMagick-6.9.0\VisualMagick\Release\CORE_glib\BuildLog.htm"
3>CORE_glib - 2 error(s), 0 warning(s)
Do you know where is the definition for _ReadDirectoryChangesW ( missing source file ? , reference to some external libs ? )
The problem is that giomodule.c and gdbusprivate.c both include "config.h", but the compiler find the wrong one !
In the additional include directories of the CORE_glib project, "..\..\jpeg" directory comes before "..\..\glib\glib" directory. So the compiler inlcudes the "config.h" which is inside the jpeg project folder instead of the glib one.
I've fixed the problem by copying a version of "config.h" from "\glib\glib" directory into "\glib\gio" directory.
However, I've still a problem, this time during the linking. See the error below :
3>------ Build started: Project: CORE_glib, Configuration: Release Win32 ------
3>Linking...
3> Creating library ..\lib\CORE_RL_glib_.lib and object ..\lib\CORE_RL_glib_.exp
3>gwin32directorymonitor.obj : error LNK2019: unresolved external symbol _ReadDirectoryChangesW referenced in function _g_win32_directory_monitor_callback@12
3>..\bin\CORE_RL_glib_.dll : fatal error LNK1120: 1 unresolved externals
3>Build log was saved at "file://c:\Home\Projects\Test\ImageMagick\ImageMagick-6.9.0\VisualMagick\Release\CORE_glib\BuildLog.htm"
3>CORE_glib - 2 error(s), 0 warning(s)
Do you know where is the definition for _ReadDirectoryChangesW ( missing source file ? , reference to some external libs ? )
Re: Fail to compile CORE_glib project in VisualMagic solution
It looks like that header is also coming from the Microsoft Windows SDK.
-
- Posts: 3
- Joined: 2014-11-27T05:59:36-07:00
- Authentication code: 6789
Re: Fail to compile CORE_glib project in VisualMagic solution
I've found a way to compile the glib project :
It is necessary to change the additional include directories setting and move the related jpeg folders at the end of the list : "..\..\jpeg" and "..\..\jpeg\simd". Many source files of the glib project includes the (wrong) "config.h" from the jpeg project instead of the config.h from the glib project.
The svn repository should be updated with these changes in order to make the windows projects compilable. ( tests with VS2005 )
Thanks
It is necessary to change the additional include directories setting and move the related jpeg folders at the end of the list : "..\..\jpeg" and "..\..\jpeg\simd". Many source files of the glib project includes the (wrong) "config.h" from the jpeg project instead of the config.h from the glib project.
The svn repository should be updated with these changes in order to make the windows projects compilable. ( tests with VS2005 )
Thanks
Re: Fail to compile CORE_glib project in VisualMagic solution
I am planning to improve the way configure.exe works and creates the project files. I will make sure to include these fixes.