Comments (18)
It looks like the hello world source set doesn't include opt.c. I don't
have access to any Windows machines to confirm though.
On Mon, 14 Dec 2015 at 20:59, Mike Parsons [email protected] wrote:
"C:\Haywire\haywiresln" (default target) (1) ->
"C:\Haywire\haywire_hello_worldvcxprojmetaproj" (default target) (4) ->
"C:\Haywire\haywire_hello_worldvcxproj" (default target) (7) ->
(Link target) ->
programobj : error LNK2019: unresolved external symbol opt_config_init
refer
enced in function main [C:\Haywire\haywire_hello_worldvcxproj]
programobj : error LNK2019: unresolved external symbol opt_config_free
refer
enced in function main [C:\Haywire\haywire_hello_worldvcxproj]
programobj : error LNK2019: unresolved external symbol opt_args_free
referen
ced in function main [C:\Haywire\haywire_hello_worldvcxproj]
programobj : error LNK2019: unresolved external symbol opt_config_parse
refe
renced in function main [C:\Haywire\haywire_hello_worldvcxproj]
programobj : error LNK2019: unresolved external symbol opt_flag_bool
referen
ced in function main [C:\Haywire\haywire_hello_worldvcxproj]
programobj : error LNK2019: unresolved external symbol opt_flag_int
referenc
ed in function main [C:\Haywire\haywire_hello_worldvcxproj]
programobj : error LNK2019: unresolved external symbol opt_flag_string
refer
enced in function main [C:\Haywire\haywire_hello_worldvcxproj]
C:\Haywire\builds\windows\debug\haywire_hello_world\haywire_hello_worldexe
:
fatal error LNK1120: 7 unresolved externals
[C:\Haywire\haywire_hello_worldvc
xproj]134 Warning(s)
8 Error(s)—
Reply to this email directly or view it on GitHub
#76.
from haywire.
I got it compiled by including opt.c in the visual studio project, however when I run the program and fire off a request, it immediately exits. See the attached gif.
from haywire.
If you compile in debug mode, do you get an error message when you run it?
from haywire.
Nope ... nothing. The same thing happens if I try to connect via the
browser. The server ends immediately.
On Wed, Dec 16, 2015 at 4:43 AM, Nuno Guerreiro [email protected]
wrote:
If you compile in debug mode, do you get an error message when you run it?
—
Reply to this email directly or view it on GitHub
#76 (comment).
from haywire.
I wonder what
https://github.com/kellabyte/Haywire/blob/master/src/haywire/http_server.c#L203
is
actually returning in that case. Could you print the result of that call?
On Wed, Dec 16, 2015 at 10:18 AM Mike Parsons [email protected]
wrote:
Nope ... nothing. The same thing happens if I try to connect via the
browser. The server ends immediately.On Wed, Dec 16, 2015 at 4:43 AM, Nuno Guerreiro [email protected]
wrote:If you compile in debug mode, do you get an error message when you run
it?—
Reply to this email directly or view it on GitHub
#76 (comment).—
Reply to this email directly or view it on GitHub
#76 (comment).
from haywire.
I set up the debugger in Visual Studio and it breaks here (strlen.asm)
[image: Inline image 1]
On Wed, Dec 16, 2015 at 5:25 AM, Nuno Guerreiro [email protected]
wrote:
I wonder what
https://github.com/kellabyte/Haywire/blob/master/src/haywire/http_server.c#L203
is
actually returning in that case. Could you print the result of that call?On Wed, Dec 16, 2015 at 10:18 AM Mike Parsons [email protected]
wrote:Nope ... nothing. The same thing happens if I try to connect via the
browser. The server ends immediately.On Wed, Dec 16, 2015 at 4:43 AM, Nuno Guerreiro <
[email protected]>
wrote:If you compile in debug mode, do you get an error message when you run
it?—
Reply to this email directly or view it on GitHub
<#76 (comment)
.—
Reply to this email directly or view it on GitHub
#76 (comment).—
Reply to this email directly or view it on GitHub
#76 (comment).
from haywire.
Here is where the error occurs ... getting the strlen(current_time)
[image: Inline image 1]
On Wed, Dec 16, 2015 at 5:38 AM, Mike Parsons [email protected]
wrote:
I set up the debugger in Visual Studio and it breaks here (strlen.asm)
[image: Inline image 1]
On Wed, Dec 16, 2015 at 5:25 AM, Nuno Guerreiro [email protected]
wrote:I wonder what
https://github.com/kellabyte/Haywire/blob/master/src/haywire/http_server.c#L203
is
actually returning in that case. Could you print the result of that call?On Wed, Dec 16, 2015 at 10:18 AM Mike Parsons [email protected]
wrote:Nope ... nothing. The same thing happens if I try to connect via the
browser. The server ends immediately.On Wed, Dec 16, 2015 at 4:43 AM, Nuno Guerreiro <
[email protected]>
wrote:If you compile in debug mode, do you get an error message when you run
it?—
Reply to this email directly or view it on GitHub
<
https://github.com/kellabyte/Haywire/issues/76#issuecomment-165049690>.—
Reply to this email directly or view it on GitHub
<#76 (comment)
.—
Reply to this email directly or view it on GitHub
#76 (comment).
from haywire.
Sorry ... here's the screenshot
from haywire.
Humm, that's weird. I just checked the documentation on MSDN and ctime
is supposed to return a null terminated string, so strlen shouldn't have an issue.
Note that current_datetime.length
is initialized until the next line runs. Does strlen cause a segmentation fault or does it return?
from haywire.
It causes a segmentation fault and the program exits
On Wed, Dec 16, 2015 at 6:43 AM, Nuno Guerreiro [email protected]
wrote:
Humm, that's weird. I just checked the [image: documentation on MSDN]
https://camo.githubusercontent.com/0fa69a427078eefe730a0aedb180c20a47237e62/68747470733a2f2f6d73646e2e6d6963726f736f66742e636f6d2f656e2d75732f6c6962726172792f35397735786364792e61737078
and ctime is supposed to return a null terminated string, so strlen
shouldn't have an issue.Note that current_datetime.length is initialized until the next line
runs. Does strlen cause a segmentation fault or does it return?—
Reply to this email directly or view it on GitHub
#76 (comment).
from haywire.
And what's the value of current_time
btw? I wonder if that is returning NULL
.
from haywire.
Error Reading Character Of Strings
Unable to read memory
On Wed, Dec 16, 2015 at 9:32 AM, Nuno Guerreiro [email protected]
wrote:
And what's the value of current_time btw?
—
Reply to this email directly or view it on GitHub
#76 (comment).
from haywire.
If you need a Windows Environment to test on ... just load up this Hands On Lab from Microsoft and it gives you a full blown remote Windows - Visual Studio 2015 environment all avilable from a web browser
from haywire.
Sweet!
from haywire.
@mikeptweet - I ran build.bat
to generate the solution files and I didn't have to add any additional sources. After that I was able to reproduce the error. I fixed it by adding:
#include <time.h>
at the top of http_response_cache.c.
Can you try doing that and running again just to confirm?
from haywire.
Opened #77 to fix it. Without the header, the current time is returns as negative and that causes ctime to return an invalid string.
from haywire.
Bingo ... thanks a bunch :-)
from haywire.
Happy to help :-)
On Wed, 16 Dec 2015 at 18:03, Mike Parsons [email protected] wrote:
Bingo ... thanks a bunch :-)
—
Reply to this email directly or view it on GitHub
#76 (comment).
from haywire.
Related Issues (20)
- Default configuration
- haywire_hello_world sometimes segfaults HOT 4
- build fails on OS X 10.11.3 with latest Xcode HOT 2
- [Discussion] Running the benchmarks
- Reduce malloc() and free() calls HOT 2
- Error building on Windows 2012 R2 Standard (x64) and MVSC2015 HOT 1
- Errors building ib Ubuntu HOT 1
- How about haywire vs h2o or mongoose? HOT 1
- remote peer address
- i run hello world sample on windows(visual studio), when i change thread count > 0, sample can't run HOT 1
- compiling with gyp HOT 3
- Is there any plan to support websocket?
- Should the print body function (hw_print_body) be in Hawyire.h?
- Assertion failed: (server->loop == client->loop) when starting IPC worker threads
- Create a Makefile to replace make.sh HOT 1
- Investigate using mlock
- Split the multi-event loop IPC and REUSEPORT multi-threading from http_server
- Assertion failed: ... does not yet support other types of streams
- pointer being freed was not allocated
- Use the fastest Http Parser picoparser
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haywire.