Jump to content

Only gets [Linker error] undefined reference to *


Guest FogZ
 Share

Recommended Posts

I use Dev-C++ 4.9.9.0 and are trying to use the autoitx dll

What i do is include the aotuit3.h header file and add the library autoitx3.lib to the linker options and it compiles fine.

But then i try to use an autoit function in my code ex. AU3_Send("test",0); i can't compile it just gets the error "[Linker error] undefined reference to `AU3_Send@8'"

Devs g++ command:

g++.exe main.o -o "test.exe" -L"C:/Dev-Cpp/lib" -lautoitx3

results in

main.o(.text+0x1ad):main.cpp: undefined reference to `AU3_Send@8'

hope someone can help

Link to comment
Share on other sites

lol, just found a workaround

in autoit3.h Send is declared as AU3_API void WINAPI AU3_Send(const char *szSendText, /*[in,defaultvalue(0)]*/long nMode);

if i remove the word "WINAPI" then i can compile fine and the send function work

Link to comment
Share on other sites

Now i found a potentially bug:

if i set an option with AU3_AutoItSetOption in a thread created with the windows function CreateThread, then the thread returns the program generate a error and have to be exited (the kind of windows error there you can chose to send to ms or not send), but for now my workaround for that is simply i set all the options in the main function

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...