Re: C++/TCL Need Solution to Compile Error c2784



JesusChuyCampos@xxxxxxxxx wrote:

BTW: I did tried to add "namespace jnior { #include "integpg/
jnior_300.h" }" and created other errors where it didn't even compile.
Error Message:
jnior310tcl2.c
jnior310tcl2.c(4) : error C2061: syntax error : identifier 'jnior'
jnior310tcl2.c(4) : error C2059: syntax error : ';'
jnior310tcl2.c(4) : error C2449: found '{' at file scope (missing
function header?)
jnior310tcl2.c(4) : error C2014: preprocessor command must start as
first nonwhite space
jnior310tcl2.c(121) : fatal error C1004: unexpected end-of-file found


I forgot to mention you'd have to change over to C++ by renaming the source file
with the extension .cpp instead of .c so the compiler switches modes.


Error Message:
jnior310tcl2.c
c:\program files\tcl_tk\tcl_c_api2\integpg/jnior_300.h(19) : warning
C4031: second formal parameter list longer than the first list
c:\program files\tcl_tk\tcl_c_api2\integpg/jnior_300.h(19) : warning
C4028: formal parameter 1 different from declaration
c:\program files\tcl_tk\tcl_c_api2\integpg/jnior_300.h(19) : warning
C4142: benign redefinition of type
c:\program files\tcl_tk\tcl_c_api2\integpg/jnior_300.h(19) : warning
C4273: 'GetVersion' : inconsistent dll linkage
C:\Program Files\Microsoft Platform SDK for Windows Server
2003 R2\Include\winbase.h(1917) : see previous definition of
'GetVersion'


^- that's still the problem with <windows.h> having the same function name as one
contained in jnior_300.h. Just like the error says. What you could do is to not
#include <windows.h> at all. Tcl extensions can build without it as long as they
don't use any of the services. To be honest, you should contact the API authors
and ask them how to handle their error.


Creating library jnior310tcl2.lib and object jnior310tcl2.exp
jnior310tcl2.obj : error LNK2019: unresolved external symbol
_Connect@20 referenced in function _ConnectCmd
jnior310tcl2.obj : error LNK2019: unresolved external symbol
_Disconnect@4 referenced in function _DisconnectCmd
jnior310tcl2.dll : fatal error LNK1120: 2 unresolved externals


That part has me perplexed. jnior300.lib is included in the link, yet the linker
does resolve any function contained in it. I think you'd better ask the authors
about that. You can use the lib.exe tool to query what it contains. I'm assuming
it is an import library. If it's an import library made be Borland C++ builder,
it won't work with the MS toolchain. Even if its a static library, it should
resolve something.


--
It's psychosomatic. You need a lobotomy. I'll get a saw.
-- Calvin

Attachment: signature.asc
Description: OpenPGP digital signature



Relevant Pages

  • Re: Going From MFC to .NET
    ... Now the problem is that when I try to compile a debug or release vr. ... format; library ignored ... HardDriveTest.obj: error LNK2001: unresolved external symbol "unsigned ...
    (microsoft.public.vc.mfc)
  • Re: Menu Path solve
    ... manager will resolve all pathing internally at compile time so this is a ... > Taking the "IN LOCFILEportion out of the menu generator allows ... > selection box asking for the MyMENU even though the menu had been ... > - ommitting the LOCFILE part will work and resolve the above problem. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Compiling CERDISP.exe
    ... At his point I get linking errors. ... directory for files to compile. ... cerdisp.obj: error LNK2019: unresolved external symbol GetMessageW ... DispatchMessageW referenced in function WinMain ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Dont want Intermediate language
    ... complie my code using this.. ... just compile it as a Win32 application and it won't be ... main.obj: error LNK2019: unresolved external symbol ... I do have the platfor SDK installed.. ...
    (microsoft.public.vc.language)
  • Re: Why C++ is so widespread (and Pascal is no fun)
    ... further on before it can resolve a construct. ... As a result, there is a lot more "stacked" during compile, waiting to be resolved. ... I always thought that preprocessor is the only issue that makes the C/C++ build process so slow. ... float F2 ...
    (borland.public.delphi.non-technical)