Gamestudio Links
Zorro Links
Newest Posts
bestwinsite
by winsite3. 05/30/24 04:10
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, M_D), 668 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
can lite_C printf __LINE__ and __FILE__ likes C? #410190
10/30/12 10:26
10/30/12 10:26
Joined: Dec 2009
Posts: 128
China
frankjiang Offline OP
Member
frankjiang  Offline OP
Member

Joined: Dec 2009
Posts: 128
China
DLL function:


DLLFUNC void DLL_LineFile(int* line,char* file){
*line = __LINE__;
memset(file,0,256);
memcpy(file,__FILE__,strlen(__FILE__));
}


development 3d game is interesting!
Re: can lite_C printf __LINE__ and __FILE__ likes C? [Re: frankjiang] #410196
10/30/12 10:52
10/30/12 10:52
Joined: Jul 2008
Posts: 894
T
TechMuc Offline
User
TechMuc  Offline
User
T

Joined: Jul 2008
Posts: 894
no. LiteC does not include _FILE_, __LINE__ or similar preprocessors.
Calling such functionality from a dll will ofc not work, as in this case __FILE__ / __LINE__ will indicate the source code position in the plugin.

Re: can lite_C printf __LINE__ and __FILE__ likes C? [Re: TechMuc] #410243
10/31/12 02:38
10/31/12 02:38
Joined: Dec 2009
Posts: 128
China
frankjiang Offline OP
Member
frankjiang  Offline OP
Member

Joined: Dec 2009
Posts: 128
China
any one have a good idea to do this?Thanks guys.
__FILE__ or __LINE___ use in Lite_C


development 3d game is interesting!
Re: can lite_C printf __LINE__ and __FILE__ likes C? [Re: frankjiang] #410245
10/31/12 03:05
10/31/12 03:05
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
As TechMuc already told you: you cannot use the __FILE__ or __LINE__ macros. The only workaround is inserting the line numbers hardcoded into the sourcecode. That's an approach I definitely wouldn't recommend though.


Always learn from history, to be sure you make the same mistakes again...
Re: can lite_C printf __LINE__ and __FILE__ likes C? [Re: frankjiang] #410247
10/31/12 03:47
10/31/12 03:47
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: frankjiang
any one have a good idea to do this?

Bump this thread to give it further attention: http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=384087&Main=46054#Post384087

Otherwise, what Uhrwerk and TechMuc said, there is not much you can do here.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1