Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » How to link assembler compiled file
Re: How to link assembler compiled file [message #61688 is a reply to message #61687] Sat, 24 May 2025 13:55 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
frederik.dumarey wrote on Sat, 24 May 2025 12:07
Hello Mirek,

Thanks for mentioning the verbose console check. The .S and .CPP files were correctly compiled in .O files, but the linking failed on the global export. Most stupid error: i forgot the underscore for my variable Embarassed .

#include <iostream>

//declare the assembler function
extern "C" size_t _my_strlen(const char* str);

int main(int argc, const char *argv[])
{
	const char* message = "Hello from Assembler";
	size_t length = _my_strlen(message);
	std::cout << "Message: " << message << std::endl;
	std::cout << "Length: " << length << std::endl;
	return 0;
}


When you compile this all links up fine and runs perfectly!

So for those of you that want to include native assembler functions for SS2, AVX SIMD instructions, you can give it a try with this method Smile
As Mirek mentioned, bit exotic, but I thought why not...


Just to be sure, are you aware there are intrinsics for these?

(And also that we have common NEON/SSE2 subset supported?)

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using COM object
Goto Forum:
  


Current Time: Fri Jun 13 19:17:25 CEST 2025

Total time taken to generate the page: 0.04476 seconds