Web lists-archives.com

Re: [Mingw-users] newbie errors




ok, tried a couple different things based on suggestions received, still no joy. I'm sure I'm forgetting something or doing something stupid, but I haven't figured out what just yet.


C:\ash>gcc aaspi_file.c -L. -l aardvark.dll -o prog_ice.exe

c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -laardvark.dll
collect2.exe: error: ld returned 1 exit status

C:\ash>gcc aaspi_file.c -L. -l aardvark -o prog_ice.exe

./aardvark.dll: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status

C:\ash>gcc aaspi_file.c -L. -o prog_ice.exe

C:\Users\rhipps\AppData\Local\Temp\cc4yOh2W.o:aaspi_file.c:(.text+0xa0): undefined reference to `aa_spi_write'
C:\Users\rhipps\AppData\Local\Temp\cc4yOh2W.o:aaspi_file.c:(.text+0xb4): undefined reference to `aa_status_string'
C:\Users\rhipps\AppData\Local\Temp\cc4yOh2W.o:aaspi_file.c:(.text+0x21c): undefined reference to `aa_sleep_ms'
C:\Users\rhipps\AppData\Local\Temp\cc4yOh2W.o:aaspi_file.c:(.text+0x309): undefined reference to `aa_open'
C:\Users\rhipps\AppData\Local\Temp\cc4yOh2W.o:aaspi_file.c:(.text+0x35a): undefined reference to `aa_configure'
C:\Users\rhipps\AppData\Local\Temp\cc4yOh2W.o:aaspi_file.c:(.text+0x36e): undefined reference to `aa_target_power'
C:\Users\rhipps\AppData\Local\Temp\cc4yOh2W.o:aaspi_file.c:(.text+0x399): undefined reference to `aa_spi_configure'
C:\Users\rhipps\AppData\Local\Temp\cc4yOh2W.o:aaspi_file.c:(.text+0x3ad): undefined reference to `aa_spi_bitrate'
C:\Users\rhipps\AppData\Local\Temp\cc4yOh2W.o:aaspi_file.c:(.text+0x3e5): undefined reference to `aa_close'
collect2.exe: error: ld returned 1 exit status


from aardvark.h:

/* Write a stream of bytes to the downstream SPI slave device. */
int aa_spi_write (
    Aardvark    aardvark,
    u16         out_num_bytes,
    const u08 * data_out,
    u16         in_num_bytes,
    u08 *       data_in
);


/*
 * Return the status string for the given status code.
 * If the code is not valid or the library function cannot
 * be loaded, return a NULL string.
 */
const char * aa_status_string (
    int status
);


etc.


fyi:

 Directory of C:\ash

11/25/2016  07:08 AM    <DIR>          .
11/25/2016  07:08 AM    <DIR>          ..
02/28/2014  12:00 PM             2,749 aadetect.c
02/28/2014  12:00 PM            28,126 aardvark.c
02/28/2014  12:00 PM            55,598 aardvark.dll
02/28/2014  12:00 PM            25,398 aardvark.h
11/24/2016  12:36 PM             5,726 aaspi_file.c
02/28/2014  12:00 PM             2,919 Makefile


perhaps the makefile has some useful info.... I've looked at it but so far not sure I can use it right now.

Ralph

>+<
 |    /\
 |___/  \
 [_@_]   `<
 O O O   
      IRS!
------------------------------------------------------------------------------------
In the twenty-first century, the robot will take the place
which slave labor occupied in ancient civilization.
 -- Nikola Tesla
------------------------------------------------------------------------------------


On Thu, Nov 24, 2016 at 1:06 PM, Ralph Hipps <ralph.hipps@xxxxxxxxx> wrote:

Ok, I know I’m a newb, but I need help getting started on something urgent.

 

I’ve installed gcc, seems to be working, path is set, etc.

 

I’m getting errors about not finding stuff even tho it’s in the directory my source is in, and I’m in that dir when I invoke the tools. Seems a bit odd. I’m running on Win7 Enterprise.

 

Any suggestions?

 

aaspi_file.c has:

 

#include <stdio.h>

#include <stdlib.h>

#include "aardvark.h"

 

But….

 

C:\ash>gcc aaspi_file.c aardvark.h -o prog_ice.exe

 

C:\Users\rhipps\AppData\Local\Temp\cc6bFg5w.o:aaspi_file.c:(.text+0xa0): undefined reference to `aa_spi_write'

C:\Users\rhipps\AppData\Local\Temp\cc6bFg5w.o:aaspi_file.c:(.text+0xb4): undefined reference to `aa_status_string'

C:\Users\rhipps\AppData\Local\Temp\cc6bFg5w.o:aaspi_file.c:(.text+0x21c): undefined reference to `aa_sleep_ms'

C:\Users\rhipps\AppData\Local\Temp\cc6bFg5w.o:aaspi_file.c:(.text+0x309): undefined reference to `aa_open'

C:\Users\rhipps\AppData\Local\Temp\cc6bFg5w.o:aaspi_file.c:(.text+0x35a): undefined reference to `aa_configure'

C:\Users\rhipps\AppData\Local\Temp\cc6bFg5w.o:aaspi_file.c:(.text+0x36e): undefined reference to `aa_target_power'

C:\Users\rhipps\AppData\Local\Temp\cc6bFg5w.o:aaspi_file.c:(.text+0x399): undefined reference to `aa_spi_configure'

C:\Users\rhipps\AppData\Local\Temp\cc6bFg5w.o:aaspi_file.c:(.text+0x3ad): undefined reference to `aa_spi_bitrate'

C:\Users\rhipps\AppData\Local\Temp\cc6bFg5w.o:aaspi_file.c:(.text+0x3e5): undefined reference to `aa_close'

collect2.exe: error: ld returned 1 exit status

 

C:\ash>gcc aaspi_file.c -l aardvark.dll -o prog_ice.exe

 

c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -laardvark.dll

collect2.exe: error: ld returned 1 exit status

 

C:\ash>gcc aaspi_file.c -l aardvark.h -o prog_ice.exe

 

c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -laardvark.h

collect2.exe: error: ld returned 1 exit status

 

Thanks, and Happy Holidays!

 

Ralph Hipps

 

 

 

 

Ralph

>+<
 |    /\
 |___/  \
 [_@_]   `<
 O O O   
      IRS!
------------------------------------------------------------------------------------
In the twenty-first century, the robot will take the place
which slave labor occupied in ancient civilization.
 -- Nikola Tesla
------------------------------------------------------------------------------------


------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe