flat assembler
Message board for the users of flat assembler.

Index > High Level Languages > how do you know use tinycc call wsastartup?

Author
Thread Post new topic Reply to topic
kerr



Joined: 24 Feb 2016
Posts: 156
kerr 26 May 2017, 10:58
hello friends.

how do you know use tinycc call WSAStartup?

_________________
I hope we will be good friends.
Post 26 May 2017, 10:58
View user's profile Send private message Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 156
kerr 27 May 2017, 01:59
I use tcc test.c wsock.def command.
But I ran it to show errors.
Code:
#include <stdio.h>
int main()
{
    WSADATA wsa={0};
    WSAStartup(MAKEWORD(2,2),&wsa);
    return 0;
}
    
Post 27 May 2017, 01:59
View user's profile Send private message Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 156
kerr 29 May 2017, 05:08
Hi friends .

can you help me ?

i use compiler is tcc .

but i call windows winsock function is show error.

Oh this is that's too bad.
Post 29 May 2017, 05:08
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20304
Location: In your JS exploiting you and your system
revolution 29 May 2017, 05:11
It would help if you describe the error you get? Is it from the compiler, or at runtime? What is the message?
Post 29 May 2017, 05:11
View user's profile Send private message Visit poster's website Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 156
kerr 29 May 2017, 05:19
test.c:4: error: 'WSADATA' undeclared.
Post 29 May 2017, 05:19
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20304
Location: In your JS exploiting you and your system
revolution 29 May 2017, 05:22
I'd expect you need to include the winsock library:
Code:
#include <winsock.h>  ;// <--- I don't know the actual filename, but you'll need something like this    
Post 29 May 2017, 05:22
View user's profile Send private message Visit poster's website Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 156
kerr 29 May 2017, 05:24
this compiler is tinycc .

I don't know how to use it.
Post 29 May 2017, 05:24
View user's profile Send private message Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 156
kerr 29 May 2017, 05:27
tinycc is no winsock library.

is using tcc winsock.def test.c command compile.
Post 29 May 2017, 05:27
View user's profile Send private message Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 156
kerr 29 May 2017, 05:41
this is tinycc website url https://bellard.org/tcc/.

I can't get what I need。
Post 29 May 2017, 05:41
View user's profile Send private message Reply with quote
alkap



Joined: 18 Feb 2015
Posts: 44
Location: Dnipro, Ukraine
alkap 29 May 2017, 06:27
kerr wrote:
this is tinycc website url https://bellard.org/tcc/.

I can't get what I need。


You want to make sure you've set up your tcc environment on Windows as described in this doc:
http://repo.or.cz/tinycc.git/blob_plain/HEAD:/win32/tcc-win32.txt

Here are also examples of C programs for Windows:
http://repo.or.cz/tinycc.git/blob_plain/HEAD:/win32/examples
Post 29 May 2017, 06:27
View user's profile Send private message Send e-mail Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 156
kerr 29 May 2017, 06:46
alkap wrote:
kerr wrote:
this is tinycc website url https://bellard.org/tcc/.

I can't get what I need。


You want to make sure you've set up your tcc environment on Windows as described in this doc:
http://repo.or.cz/tinycc.git/blob_plain/HEAD:/win32/tcc-win32.txt

Here are also examples of C programs for Windows:
http://repo.or.cz/tinycc.git/blob_plain/HEAD:/win32/examples


yeah..

This does not tell you how to use it

_________________
I hope we will be good friends.
Post 29 May 2017, 06:46
View user's profile Send private message Reply with quote
alkap



Joined: 18 Feb 2015
Posts: 44
Location: Dnipro, Ukraine
alkap 29 May 2017, 07:05
kerr wrote:
alkap wrote:
kerr wrote:
this is tinycc website url https://bellard.org/tcc/.

I can't get what I need。


You want to make sure you've set up your tcc environment on Windows as described in this doc:
http://repo.or.cz/tinycc.git/blob_plain/HEAD:/win32/tcc-win32.txt

Here are also examples of C programs for Windows:
http://repo.or.cz/tinycc.git/blob_plain/HEAD:/win32/examples


yeah..

This does not tell you how to use it


Can you try the method posted here:
https://stackoverflow.com/questions/4069770/tiny-c-compiler-tcc-and-winsock/9351171#9351171

and see if that helps?
Post 29 May 2017, 07:05
View user's profile Send private message Send e-mail Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 156
kerr 29 May 2017, 07:21
here is Use to export definitions from the DLL file using the command line.

Sorry, I've already seen it.
Post 29 May 2017, 07:21
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.