Sign in to follow this  
Followers 0
erifash

Help

9 posts in this topic

#1 ·  Posted (edited)

How do I use AutoItX with C++? I know you have to #include <AutoIt3.h> but when I try and compile it gives me undefined function. Does it have something to do with the AutoIt3.lib file? I searched around and heard about that a little bit. I just don't know what to do, I am a noob at C++. :P I have Dev-C++ v4.9.9.2.

Thank you.

Edited by erifash

Share this post


Link to post
Share on other sites



Why don't you look at "C:\Program Files\AutoIt3\AutoItX\StandardDLL\VC6\Example\" ?

Try copying and pasting the folder somewhere else and using that as a starting point.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I just got back from my vacation and I tried to compile the example provided with the version of Dev C++ mentioned earlier and it throws undefined function errors for the four functions used in the example. I am no C++ expert so would someone please be kind enough to explain to me why this is happening and how to fix it so it works? Thank you for your patience. :P

Edited by erifash

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Using Dev C++? Now i see, slightly more complicated than Visual C++.

The all the files come from the Sample directory at "C:\Program Files\AutoIt3\AutoItX\StandardDLL\VC6\Example" on my system.

So the steps are:

1. Create new project (File>New>Project, then Empty project)

2. Add "AutoIt3.h" to project. (Project>Add to Project, Select file "AutoIt2.h")

3. Add "AutoItX3.lib" to linker options (Project>Project Options, select the Parameters tab. Click "Add library" and select "AutoItX3.lib")

4. Program as normal and add your *.cpp files to the project (or try out the sample by adding the main.cpp to the project)

EDIT: Sample Directory Path

Edited by nfwu

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I followed your steps to the word then I clicked Project>Add to Project and added the main.cpp from the example. I am still getting linker errors about 'undefined refrence's to the functions used. It will be nice if I could just get this working... :P

P.S. - To compile I just hit ctrl+F9.

Edited by erifash

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I personally use Microsoft Visual C++, and find no problems with it. Sorry i can't help.

EDIT: Not even Dev C++'s "File>Import>MS Visual C++ Project" works for this project! That's completely strange...

Edited by nfwu

Share this post


Link to post
Share on other sites

Okay, nevermind. I figured out how to get this working with Dev-C++! Everything required to do this is in the zip file attached (Read the README for instructions).

Share this post


Link to post
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
Sign in to follow this  
Followers 0