[mapserver-users] VisualC++ Experts..

Eduin Yesid Carrillo yecarrillo at hotmail.com
Thu May 17 10:16:52 PDT 2001


Hi list.
Please give me any hint for this error in vc6 and mapsde.c. Micosoft 
Knowledge Base give some workarounds for this error, but I don't know how 
implement them for sg.h (ArcSDE).
All 26 times that mapsde.c call SDE functions, generates this error:

*******
   Creating library mapserv.lib and object mapserv.exp
mapserver.lib(mapsde.obj) : error LNK2001: unresolved external symbol 
_SE_connection_free
mapserver.lib(mapsde.obj) : error LNK2001: unresolved external symbol 
_SE_shape_free
...
mapserver.lib(mapsde.obj) : error LNK2001: unresolved external symbol 
_SE_shape_get_num_parts
mapserv.exe : fatal error LNK1120: 26 unresolved externals
NMAKE : fatal error U1077: '"C:\Archivos de programa\Microsoft Visual 
Studio\VC98\BIN\link.exe"' : return code '0x460'
Stop.
Error executing NMAKE.
*******

>From Microsoft:
http://support.microsoft.com/support/kb/articles/Q123/7/68.asp?LN=EN-US&SD=gn&FR=0&qry=unresolved%20external%20symbol&rnk=6&src=DHCS_MSPSS_gn_SRCH&SPR=VCC

CAUSE
Inline functions are not visible outside of the source file where they are 
defined. The Inline Specifier section in the C++ Language Reference states, 
"Functions that are declared as inline and that are not class member 
functions have internal linkage unless otherwise specified."

RESOLUTION
Here are five possible workarounds:
**Declare the inline function with the extern keyword to force external 
linkage. Note, however, that using extern with class member functions will 
cause a warning with /Ze, and an error with /Za.
-or-
**Move the function definition to the header file so it's included in each 
translation unit used.
-or-
**Remove the inline specification.
-or-
**Force a function version of the inline function to be created in the 
module that it is defined in. You can do this by referencing the address of 
the inline function, by assigning it to a function pointer, or by passing it 
to a function.
-or-
**Remove the /Ob1 (Only Inline) or /Ob2 (Any suitable) option from the 
command line and compile with /Ob0 (Disable). The /Ob0 option is the default 
if no options are specified.

STATUS
This behavior is by design.

Thanks in advanced.

Eduin Yesid Carrillo

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




More information about the MapServer-users mailing list