# Libraries...how is this possible?

How is it possible that compiling TC1test.ino, I get error: undefined reference to `TxBytes’, but if I compile BasicSerial.ino,
I don’t get any errors?
Take a look at all the files in these two programs written only to test assembly usage with Arduino. They are identical except for
the filenames…So where is the error?
thanks!

Program that doesn’t compile correctly:
TC1test.ino in folder …\MySketches\TC1test

#include <TC1test.h>
void setup() {
TxBytes (0);
}
void loop(){
}

TC1test.h in library TC1test

extern “C” { void TxBytes(int); }

TC1test.s in library TC1test

#include <avr/io.h>
.global TxBytes
TxBytes:
com r24
nop
ret

Program that compiles correctly:
BasicSerial.ino in folder …\MySketches\BasicSerial

#include <BasicSerial.h>
void setup() {
TxBytes (0);
}
void loop(){
}

BasicSerial.h in library BasicSerial

extern “C” { void TxBytes(int); }

BasicSerial.s in library BasicSerial

#include <avr/io.h>
.global TxBytes
TxBytes:
com r24
nop
ret

use code tags.

#include for system libs
#include “lib” for user libs

Mark

holmes4:
use code tags.

#include for system libs
#include “lib” for user libs

Mark

Thanks!
I tried:
#include “c:\Program Files\Arduino\libraries\TC1test\TC1test.h”
and #include “TC1test.h”
Still I got the same error message

btw: The BasicSerial is an modified example from net, I dont’ think it has anything to do with system libraries. I just made BasicSerial folder under libraries and copied the .s and .h files there.

I have a sketch BasicSerial.ino and a library BasicSerial, where there are two files BasicSerial.h and BasicSerial.s.
The library is an user library, not the library that comes with arduino software.
I also have another sketch TC1test.ino and a library TC1test, where there are two files TC1test.h and TC1test.s
This library is also an user library, not the library that comes with arduino software.

Now The code in all those sketches and library files are IDENTICAL, only the filenames differ.
When I verify the sketch BasicSerial.ino, all goes well, no errors, but when I verify TC1test.ino, I get: undefined reference to `TxBytes’
TxBytes is function/routine written in assembler in files TC1test.s and BasicSerial.s and the code is IDENTICAL!!
In BasicSerial.ino there is: #include <BasicSerial.h>, in TC1test.ino there is: #include <TC1test.h>. Both headers are IDENTICAL.
Now if I use #include <BasicSerial.h> in TC1test.ino, all compiles without errors!!!
So I think that something odd must be going on in how arduino handles the libraries. I find this very very odd.
Both libraries are under …MySketches\libraries in my PC and averything in the libraries is identical except the filenames.
How can possible be this?
thx