Jump to content

Recommended Posts

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
  • 2 weeks later...
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
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
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
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
Posted

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).

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
  • Recently Browsing   0 members

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