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



On Apr 19, 5:59 am, David Gravereaux <davyg...@xxxxxxxxx> wrote:
JesusChuyCam...@xxxxxxxxx wrote:
By any chance when you build your DLL, did it depend on msvcr80.dll?

No, I get msvcrt.dll. That's your compiler's fault. Replace -MD with -MT in the
command line and it should lose that dependency.

Once I copy both jnior300.dll and the msvcr80.dll to the same
directory as jnior310tcl2.dll the error message of "couldn't load
library ....: this library or a dependent library could not be found
in library path" went away but I got a new error message "could not
find the section that owns the import directory".

That's a new one for me. I've never seen that before.

When I look at the
msvcr80.dll with "depends" it is a shade of red; with some functions
green and others red. I have three of these DLLs: One for win64,
amd64 and the other for Microsoft.vc80.crt. Each have some issue.

No clue.. all new.

--
"The intrepid Spaceman Spiff is stranded on a distant planet!
..our hero ruefully acknowledges that this happens fairly
frequently.." --- Calvin and Hobbes

signature.asc
1KDownload

Well I guess my post at 7pm did go through. This is the 2nd time that
happens.


Well, the "-MT" did remove the dependency on the msvcr80.dll. I do
get a warning message:
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of
other libs; use /NODEFAULTLIB:library
But it appears I can ignore it for now. When I looked at the contents
of the new DLL via "depends" it showed that the name of the function
is screwed up. I reviewed the code and remember I need to use extern
"C".

Therefore line:
__declspec(dllexport) Tcl_AppInitProc Jnior_Init;
Became line:
extern "C"
{
__declspec(dllexport) Tcl_AppInitProc Jnior_Init;
}

Question: Why can't the name be Jnior310tcl_Init? I tried that and
TCL crashed because it is expecting the name to be Jnior_Init.

Anyways, I'm able to connect to the device, but I'm unable to
disconnect from it. When I pass the handler to disconnect, I get an
error message:

C:\Program Files\TCL_TK\tcl_c_api2>tclsh
% load jnior310tcl2.dll
% set a [ jnior::Connect "192.168.5.2" 9200 "jnior" "jnior" ]
10001
% puts ${a}
10001
% jnior::Disconnect ${a}
Error 10004Error 115%
% exit
DLL Being unloaded now
C:\Program Files\TCL_TK\tcl_c_api2>

I even tried hardcoding the value, but nothing. Any ideas?

-JC

.



Relevant Pages

  • Re: Newbie question
    ... I think the problem has everything to do with the C# dll: ... run directory because it would conflict with dependency 'mscorlib, ... > Based on the error message you have provided, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: cannot load dll xpstar.dll reason 126
    ... Cannot load the DLL xp_star.dll, or one of the DLLs it ... references. ... tool like Dependency Walker to list all the ... >This error message happens when trying to restore/backup a database ...
    (microsoft.public.sqlserver.server)
  • Re: C++/TCL Need Solution to Compile Error c2784
    ... directory as jnior310tcl2.dll the error message of "couldn't load ... in library path" went away but I got a new error message "could not ... the "-MT" did remove the dependency on the msvcr80.dll. ... DLL Being unloaded now ...
    (comp.lang.tcl)
  • RE: fax notification
    ... Thank you for posting in the SBS newsgroup. ... message "mail system wrong DLL", and the inbound fax cannot was deliver to ... Please copy the exact error message and paste it in your reply. ...
    (microsoft.public.windows.server.sbs)
  • Re: Redirecting stderr
    ... console application that makes calls to the DLL. ... That sounds like a question more appropriate for a Windows ... libraries). ... it doesn't print an error message; ...
    (comp.lang.c)